package com.pai4j.common.exception;
import com.pai4j.common.enums.PAIErrorCommonEnum;
/**
 *  参数异常处理类
 *
 * @author: CYM-pai
 * @date: 2025/04/16 19:52
 **/
public class ParamException extends RuntimeException {

    private Integer code = 444;

    public ParamException() {
        super();
    }

    public ParamException(String msg) {
        super(msg);
    }

    public ParamException(PAIErrorCommonEnum paiErrorCommonEnum) {
        super(paiErrorCommonEnum.getMessage());
        this.code = paiErrorCommonEnum.getCode();
    }

    public ParamException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public ParamException(String message, Throwable cause) {
        super(message, cause);
    }

    public Integer getCode() {
        return code;
    }
}
